package cn.wk.quartz.job;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.Date;

public class PrintTimeJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //获取传递的参数
        JobDataMap jobDataMap = jobExecutionContext.getMergedJobDataMap();
        String msg = jobDataMap.getString("msg");
        System.out.println(msg);
    }
}
